package com.sifa.springcloud.service;

import com.sifa.springcloud.hystrixhandler.HystrixExceptionHandler;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

//调用服务
@FeignClient(value = "cloud-provider-hystrix-payment",fallback = HystrixExceptionHandler.class)
public interface PaymentHystrixTest {

    @GetMapping("payment/hystrix/ok/{id}")
    public String payment(@PathVariable("id")Integer id);

    @GetMapping("payment/hystrix/timeout/{id}")
    public String paymentError(@PathVariable("id")Integer id);
}
